<head th:include="/header:: header"></head>
<div class="row">
	<div class="col-lg-12">
		<section class="panel">
			<div class="panel-body">
				<form role="form" action=" " method="post" id="form">

					<div class="row" th:style="${type} != 'desktop'?'' : 'display: none'">
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="source">任务来源</label> <select name="source"
									class="js-example-basic-single form-control" id="source">
									<option th:selected="${task.source eq '局端产品研发'}" value="局端产品研发">局端产品研发</option>
									<option th:selected="${task.source  eq '问题管理平台'}"
										value="问题管理平台">问题管理平台</option>
									<option th:selected="${task.source  eq '项目交付'}" value="项目交付">项目交付</option>
									<option th:selected="${task.source  eq '临时性任务'}" value="临时性任务">临时性任务</option>
								</select>
							</div>
						</div>
						<div class="col-lg-4 col-sm-4 control-label form-group ">
							<label for="problemId">问题编号</label>
							<div class="form-group">
								<div class="input-group input-group-sm">
									<input name="problem.id" id="problemId" disabled="disabled"
										class="form-control fc-clear"
										th:value=" ${task.problem}==null? '' : ${task.problem.id}" />
									<span
										class="
										glyphicon glyphicon-zoom-in
										input-group-addon"
										id="queryProblemId"></span>
								</div>
							</div>
						</div>
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="type">任务类型</label> <select name="type"
									class="js-example-basic-single form-control" id="type">
									<option th:selected="${task.type  eq '售前'}" value="售前">售前</option>
									<option th:selected="${task.type  eq '需求'}" value="需求">需求</option>
									<option th:selected="${task.type  eq '设计'}" value="设计">设计</option>
									<option th:selected="${task.type  eq '功能开发'}" value="功能开发">功能开发</option>
									<option th:selected="${task.type  eq '接口开发'}" value="接口开发">接口开发</option>
									<option th:selected="${task.type  eq '问题修复'}" value="问题修复">问题修复</option>
									<option th:selected="${task.type  eq '测试'}" value="测试">测试</option>
									<option th:selected="${task.type  eq '实施'}" value="实施">实施</option>
									<option th:selected="${task.type  eq '其他'}" value="其他">其他</option>
									<option th:selected="${task.type  eq '文档'}" value="文档">文档</option>
								</select>
							</div>
						</div>

					</div>
					<div class="row" th:style="${type} != 'desktop'?'' : 'display: none'">
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="region">所属地区</label> <input class="form-control"
									name="region" id="region" th:value="${task.region}" />
							</div>
						</div>
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="sszb">所属组别</label> <select name="sszb"
									class="js-example-basic-single form-control" id="sszb">
									<option value="">--请选择--</option>
									<option th:selected="${deptId eq 1}" value="1">申报缴税</option>
									<option th:selected="${deptId eq 2}" value="2">在线办税</option>
									<option th:selected="${deptId eq 3}" value="3">信息服务</option>
									<option th:selected="${deptId eq 4}" value="4">总体组</option>
								</select>
							</div>
						</div>
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="optUser">处理人员</label> <select name="optUser"
									class="js-example-basic-single form-control" id="optUser">
								</select> <input type="hidden" id="optUserInit"
									th:value="${task.optPerson.id}" />
							</div>
						</div>
					</div>
					<div class="row" th:style="${type} != 'desktop'?'' : 'display: none'">
						<div class="col-lg-12 col-sm-12 control-label">
							<div class="form-group">
								<label for="earlyStartStr">计划名称</label>
								<textarea id="name" name="name" class="form-control" rows="3"
									th:value="${task.name}" />
							</div>
						</div>
					</div>
					<div class="row" th:style="${type} != 'desktop'?'' : 'display: none'">
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="earlyStartStr">计划开始时间</label>
								<div class="input-group date form_date " data-date=""
									data-date-format="yyyy-mm-dd" data-link-field="earlyStartStr"
									data-link-format="yyyy-mm-dd">
									<input class="form-control" type="text" id="earlyStartStr"
										name="earlyStartStr" /> <span class="input-group-addon"><span
										class="glyphicon glyphicon-remove"></span></span> <span
										class="input-group-addon"><span
										class="glyphicon glyphicon-calendar"></span></span>
								</div>
							</div>
						</div>
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="earlyFinishStr">计划结束时间</label>
								<div class="input-group date form_date " data-date=""
									data-date-format="yyyy-mm-dd" data-link-field="earlyFinishStr"
									data-link-format="yyyy-mm-dd">
									<input class="form-control" id="earlyFinishStr"
										name="earlyFinishStr" type="text" /> <span
										class="input-group-addon"><span
										class="glyphicon glyphicon-remove"></span></span> <span
										class="input-group-addon"><span
										class="glyphicon glyphicon-calendar"></span></span>
								</div>
							</div>
						</div>
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="earlyVersion">计划版本号</label> <input
									name="earlyVersion" class="form-control" id="earlyVersion"
									th:value="${task.earlyVersion}" />
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="lateStartStr">实际开始时间</label>
								<div class="input-group date form_date " data-date=""
									data-date-format="yyyy-mm-dd" data-link-field="lateStartStr"
									data-link-format="yyyy-mm-dd">
									<input class="form-control" type="text" id="lateStartStr"
										name="lateStartStr" /> <span class="input-group-addon"><span
										class="glyphicon glyphicon-remove"></span></span> <span
										class="input-group-addon"><span
										class="glyphicon glyphicon-calendar"></span></span>
								</div>
							</div>
						</div>
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="lateFinishStr">实际结束时间</label>
								<div class="input-group date form_date " data-date=""
									data-date-format="yyyy-mm-dd" data-link-field="lateFinishStr"
									data-link-format="yyyy-mm-dd">
									<input class="form-control" type="text" id="lateFinishStr"
										name="lateFinishStr" /> <span class="input-group-addon"><span
										class="glyphicon glyphicon-remove"></span></span> <span
										class="input-group-addon"><span
										class="glyphicon glyphicon-calendar"></span></span>
								</div>
							</div>
						</div>
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="lateVersion">实际版本号</label> <input name="lateVersion"
									class="form-control" id="lateVersion"
									th:value="${task.lateVersion}" />
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-lg-4 col-sm-4 control-label">
							<div class="form-group">
								<label for="versionDateStr">实际版本发布日期</label>
								<div class="input-group date form_date  " data-date=""
									data-date-format="yyyy-mm-dd" data-link-field="versionDateStr"
									data-link-format="yyyy-mm-dd">
									<input class="form-control" type="text" id="versionDateStr"
										name="versionDateStr" /> <span class="input-group-addon"><span
										class="glyphicon glyphicon-remove"></span></span> <span
										class="input-group-addon"><span
										class="glyphicon glyphicon-calendar"></span></span>
								</div>
							</div>
						</div>
						<div class="col-lg-8 col-sm-8 control-label">
							<div class="form-group">
								<label for="notes">备注</label> <input name="notes"
									class="form-control" id="bz" th:value="${task.notes}" />
							</div>
						</div>
					</div>
					<button type="button" class="btn btn-primary" id="submit">提交</button>
					<input type="hidden" name="id" id="id" th:value="${task.id}" />
				</form>
			</div>
		</section>
	</div>
</div>
<script th:src="@{../modular/pms/mysql/task/edit.js}"></script>

<script th:inline="javascript">
    var earlyStartStr = [[${task.earlyStart}]] == null ? "":[[${task.earlyStart}]].substring(0,10);
    var earlyFinishStr = [[${task.earlyFinish}]] == null ? "":[[${task.earlyFinish}]].substring(0,10);
    var lateStartStr = [[${task.lateStart}]] == null ? "":[[${task.lateStart}]].substring(0,10);
    var lateFinishStr = [[${task.lateFinish}]] == null ? "":[[${task.lateFinish}]].substring(0,10);
    var versionDateStr = [[${task.versionDate}]] == null ? "":[[${task.versionDate}]].substring(0,10);
    $("#name").val([[${task.name}]]);
    $( "#earlyStartStr" ).val(earlyStartStr);
    $( "#earlyFinishStr" ).val(earlyFinishStr);
    $( "#lateStartStr" ).val(lateStartStr);
    $( "#lateFinishStr" ).val(lateFinishStr);
    $( "#versionDateStr" ).val(versionDateStr);

</script>
<div th:include="/footer:: footer"></div>
